*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f0f0f0;
    transition:  0.5s;
}
.darkMode{
    background: #222;
}
.darkMode .box{
    background: #292929;
}
.box{
    position: relative;
    width: 300px;
    padding: 30px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 30px 30px rgba(0,0,0,0.3);
    transition: 0.5s;
}

.profile{
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile .imgBx{
    position: relative;
    width: 50px;
    height: 50px;
    /* background: #f00; */
    border-radius: 50%;
}
.profile .imgBx img{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.profile .text{
    font-weight: 500;
    color: #333;
    line-height: 1.2em;
    transition: 0.5s;
}
.darkMode .profile .text{
    color: #ddd;
}

.darkMode .profile .text span{
    color: #aaa;
}

.profile .text span{
    font-weight: 400;
    font-size: 0.85em;
    color: #555;
}
.menu{
    position: relative;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.darkMode .menu{
    border-top: 1px solid rgba(255,255,255,0.01);
}
.menu li{
    margin: 8px 0;
    list-style: none;
}
.menu li label{
    position: relative;
    display: flex;
    justify-content: space-between;
}

.menu li label span{
    display: flex;
    justify-content: center;
    /* 对齐图标与文字 */
    align-items: center;
    /* user-select: none; */
    cursor: pointer;
    color: #000;
}
.menu li label span icon{
    margin-right: 10px;
}
.darkMode .menu li label span{
    color: #aaa;
}

.menu li label .action input{
    appearance: none;
}

.menu li label .action i{
    position: relative;
    width: 30px;
    height: 15px;
    background: #ddd;
    border-radius: 15px;
    transition: 0.5s;
}

.darkMode .menu li label .action i{
    background:#666 ;
  }

/* ~代表某元素之后的
 input被选中后 i 标签的样式
*/
.menu li label .action input:checked~i{
    background: green;
}
.menu li label .action i::before{
    content: "";
    position: absolute;
    top: 2.5px;
    left: 2.5px;
    width: 10px;
    height: 10px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: 0.5s;
}

.menu li label .action input:checked~i::before{
    /* 被选中之后的变化 */
    left: calc(100% - 12.5px);
}

